package net.oschina.allchat.protocol.im.stanza;

import java.util.ArrayList;
import java.util.List;

import net.oschina.allchat.protocol.core.LangText;
import net.oschina.allchat.protocol.core.Protocol;
import net.oschina.allchat.protocol.core.stanza.Stanza;

public final class Presence extends Stanza {
	public enum Type {
		AVAILABLE,
		UNAVAILABLE,
		SUBSCRIBE,
		SUBSCRIBED,
		UNSUBSCRIBE,
		PROBE
	}
	
	public enum Show {
		CHAT,
		AWAY,
		DND,
		XA
	}
	
	public static final Protocol PROTOCOL = new Protocol("presence");
	
	private List<LangText> status;
	private Integer priority;
	private Presence.Type type;
	private Presence.Show show;
	
	public Presence() {
		status = new ArrayList<LangText>();
	}
	
	public void setShow(Presence.Show show) {
		this.show = show;
	}
	
	public Presence.Show getShow() {
		return show;
	}
	
	public List<LangText> getStatus() {
		return status;
	}
	
	public void setStatus(List<LangText> status) {
		this.status = status;
	}
	
	public Integer getPriority() {
		return priority;
	}
	
	public void setPriority(Integer priority) {
		this.priority = priority;
	}
	
	public Presence.Type getType() {
		return type;
	}
	
	public void setType(Presence.Type type) {
		this.type = type;
	}
	
}
